import Layout from '@/layout/index.vue'
// 多级路由
import routerView from '@/components/routerView/index.vue'

const es6Route = {
  path: '/es6',
  name: 'es6',
  component: Layout,
  meta: {
    title: 'es6'
  },
  children: [
    {
      path: '3',
      meta: {
        title: '3.语言基础'
      },
      name: 3,
      component: routerView,
      children: [
        {
          meta: {
            title: '1-语法'
          },
          path: 'language',
          component: () => import(/* webpackChunkName: "es6-3-1" */ '@/views/es6/3/language/index.vue'),
        },
        {
          meta: {
            title: '2-关键字与保留字'
          },
          path: 'keyword',
          component: () => import(/* webpackChunkName: "es6-3-2" */ '@/views/es6/3/keyword/index.vue'),
        }
      ],
    },
    {
      meta: {
        title: '4.变量，作用域'
      },
      path: '4',
      children: [
        {
          meta: {
            title: '1-原始值与引用值'
          },
          path: 'key',
          component: () => import(/* webpackChunkName: "es6-4-1" */ '@/views/es6/4/key/index.vue'),
        }
      ],
    },
    {
      meta: {
        title: '8.对象，类与面向对象'
      },
      path: '8',
      component: routerView,
      children: [
        {
          meta: {
            title: '1-理解对象'
          },
          path: 'knowObject',
          component: () => import(/* webpackChunkName: "es6-8-1" */ '@/views/es6/8/knowObject/index.vue'),
        }
      ],
    }
  ]
}

export default es6Route